package Employee;

public class SalesEmployee extends Employee{
    public double MonthlySales;
    public double CommissionRate;
    public int Month;

    public SalesEmployee(String name, int num, int month, double money, double monthlySales, double commissionRate, int month1) {
        super(name, num, month, money);
        MonthlySales = monthlySales;
        CommissionRate = commissionRate;
        this.Month = month1;
    }

    public double getSalary(int month) {
       double money = MonthlySales*CommissionRate;
       return Month==month?money+100:money;
    }
}
